package com.eu.mybatis.helper;


public final class RowsHelper {
	
	private static final ThreadLocal<Integer> totalRowLocals = new ThreadLocal<Integer>() {
		protected Integer initialValue() {
			return Integer.valueOf(0);
		}
	};

	public static void setTotalRows(int count) {
		totalRowLocals.set(Integer.valueOf(count));
	}

	public static int getTotalRows() {
		try {
			return totalRowLocals.get().intValue();
		} finally {
			totalRowLocals.remove();
		}
	}
	
}